package com.atguigu.gmallsuger.mapper;

import com.atguigu.gmallsuger.bean.ProvinceStats;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ProviceStatsMapper {
 
    
    // 安装省份分组聚合
    @Select(
        "select   " +
            " province_name, " +
            " sum(order_amount) order_amount," +
            " sum(order_count) order_count " +
            "from province_stats_2021 " +
            "where toYYYYMMDD(stt)=#{date} " +
            "group by province_name "
    )
    List<ProvinceStats> getProvinceStatsByName(int date);
    
}
